

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/fluid.png">
  <link rel="icon" href="/img/fluid.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="深海火锅店">
  <meta name="keywords" content="">
  
    <meta name="description" content="进入人人开源，用git的方式下载三个项目  renren-fast renren-fast-vue renren-generator      renren-fast  新建renren-fast数据库，并执行mysql.sql内的sql语句    这里前端项目报错了，解决方法如下：123cnpm install -g node-gypnpm install --global --producti">
<meta property="og:type" content="article">
<meta property="og:title" content="人人开源配置">
<meta property="og:url" content="http://example.com/2022/12/13/%E7%BC%96%E7%A8%8B%E8%AF%AD%E8%A8%80/Java/%E9%A1%B9%E7%9B%AE/%E4%BA%BA%E4%BA%BA%E5%BC%80%E6%BA%90/%E4%BA%BA%E4%BA%BA%E5%BC%80%E6%BA%90/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="进入人人开源，用git的方式下载三个项目  renren-fast renren-fast-vue renren-generator      renren-fast  新建renren-fast数据库，并执行mysql.sql内的sql语句    这里前端项目报错了，解决方法如下：123cnpm install -g node-gypnpm install --global --producti">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950475.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950091.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950038.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950741.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950552.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950941.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950460.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950776.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951709.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951646.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951110.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951109.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951490.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951164.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951577.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951752.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951373.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951706.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951724.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951803.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951877.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951882.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951019.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951458.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951173.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201952113.png">
<meta property="og:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201952508.png">
<meta property="article:published_time" content="2022-12-13T09:00:00.000Z">
<meta property="article:modified_time" content="2024-02-15T16:04:48.972Z">
<meta property="article:author" content="深海火锅店">
<meta property="article:tag" content="人人开源">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950475.png">
  
  
    <meta name="referrer" content="no-referrer-when-downgrade">
  
  
  <title>人人开源配置 - Hexo</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.3","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"follow_dnt":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  


  
<meta name="generator" content="Hexo 6.3.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>Fluid</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/background.jpg') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="人人开源配置"></span>
          
        </div>

        
          
  <div class="mt-3">
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2022-12-13 17:00" pubdate>
          2022年12月13日 下午
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          3.3k 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          28 分钟
        
      </span>
    

    
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">人人开源配置</h1>
            
            
              <div class="markdown-body">
                
                <p>进入<a target="_blank" rel="noopener" href="https://gitee.com/renrenio">人人开源</a>，用git的方式下载三个项目</p>
<ol>
<li><a target="_blank" rel="noopener" href="https://gitee.com/renrenio/renren-fast">renren-fast</a></li>
<li><a target="_blank" rel="noopener" href="https://gitee.com/renrenio/renren-fast-vue">renren-fast-vue</a></li>
<li><a target="_blank" rel="noopener" href="https://gitee.com/renrenio/renren-generator">renren-generator</a></li>
</ol>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950475.png" srcset="/img/loading.gif" lazyload alt="1"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950091.png" srcset="/img/loading.gif" lazyload alt="2"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950038.png" srcset="/img/loading.gif" lazyload alt="3"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950741.png" srcset="/img/loading.gif" lazyload alt="4"></p>
<h2 id="renren-fast"><a href="#renren-fast" class="headerlink" title="renren-fast"></a>renren-fast</h2><p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950552.png" srcset="/img/loading.gif" lazyload alt="6"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950941.png" srcset="/img/loading.gif" lazyload alt="5"></p>
<p><strong>新建renren-fast数据库，并执行mysql.sql内的sql语句</strong></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950460.png" srcset="/img/loading.gif" lazyload alt="7"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201950776.png" srcset="/img/loading.gif" lazyload alt="8"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951709.png" srcset="/img/loading.gif" lazyload alt="9"></p>
<h4 id="这里前端项目报错了，解决方法如下："><a href="#这里前端项目报错了，解决方法如下：" class="headerlink" title="这里前端项目报错了，解决方法如下："></a>这里前端项目报错了，解决方法如下：</h4><figure class="highlight crmsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs crmsh">cnpm install -g <span class="hljs-keyword">node</span><span class="hljs-title">-gyp</span><br><br>npm install --global --production windows-build-tools<br></code></pre></td></tr></table></figure>

<p>如果一直卡在Successfully installed Python 2.7不动。</p>
<p>我电脑的解决方法是</p>
<figure class="highlight apache"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs apache"><span class="hljs-attribute">npm</span> install --global --production windows-build-tools@<span class="hljs-number">4</span>.<span class="hljs-number">0</span>.<span class="hljs-number">0</span><br></code></pre></td></tr></table></figure>

<p>如果还解决不了，请看这篇<a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_48391379/article/details/117187522">博客</a></p>
<h4 id="若后端启动报错"><a href="#若后端启动报错" class="headerlink" title="若后端启动报错"></a>若后端启动报错</h4><p>报错信息：jar:file:&#x2F;D:&#x2F;apache-maven-3.5.3&#x2F;repository&#x2F;javax&#x2F;servlet&#x2F;servlet-api…</p>
<p>表示jar包冲突，我的解决方法是<strong>先去repository删了这些包</strong>，然后重新在项目中下载</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951646.png" srcset="/img/loading.gif" lazyload alt="12"></p>
<p>运行renren-fast和renren-fast-vue两个项目，前者是后端项目，后者是前端项目</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951110.png" srcset="/img/loading.gif" lazyload alt="10"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951109.png" srcset="/img/loading.gif" lazyload alt="11"></p>
<p>账号和密码都是admin</p>
<h2 id="renren-generator"><a href="#renren-generator" class="headerlink" title="renren-generator"></a>renren-generator</h2><p>先去配置数据库的信息</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951490.png" srcset="/img/loading.gif" lazyload alt="13"></p>
<p>以demo数据库为例：</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951164.png" srcset="/img/loading.gif" lazyload alt="14"></p>
<p>新建一个springboot项目，来操作demo数据库的这几个表</p>
<p>springcloud涉及到多个数据库，则需要创建多个项目来对应每个数据库【项目与数据库一一对应】</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951577.png" srcset="/img/loading.gif" lazyload alt="15"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951752.png" srcset="/img/loading.gif" lazyload alt="16"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951373.png" srcset="/img/loading.gif" lazyload alt="17"></p>
<p><strong>【微服务还需要导入openfeign依赖】</strong></p>
<p>打开generator.properties进行配置</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951706.png" srcset="/img/loading.gif" lazyload alt="18"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951724.png" srcset="/img/loading.gif" lazyload alt="19"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951803.png" srcset="/img/loading.gif" lazyload alt="20"></p>
<p>运行项目</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951877.png" srcset="/img/loading.gif" lazyload alt="21"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951882.png" srcset="/img/loading.gif" lazyload alt="22"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951019.png" srcset="/img/loading.gif" lazyload alt="23"></p>
<p>直接复制生成的main文件夹，粘贴到项目的main处</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951458.png" srcset="/img/loading.gif" lazyload alt="24"></p>
<p>有不少报错，别急，这是因为缺少了一些工具包和相应的依赖</p>
<p>考虑到各种原因，删除刚刚生成的内容</p>
<p>我们将工具包和其他依赖【如mybatis-plus、lombok等通用的依赖】集成成一个springboot项目</p>
<p>将其他springboot的公共依赖、公共包进行整合</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201951173.png" srcset="/img/loading.gif" lazyload alt="25"></p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201952113.png" srcset="/img/loading.gif" lazyload alt="26"></p>
<p>复制粘贴renren-fast&#x2F;renren-generator内的类即可</p>
<p>在renren-common中导入依赖</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><code class="hljs xml"><span class="hljs-comment">&lt;!--mybatis-plus--&gt;</span><br><span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>com.baomidou<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>mybatis-plus-boot-starter<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>3.4.2<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br><span class="hljs-comment">&lt;!--lombok--&gt;</span><br><span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.projectlombok<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>lombok<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.18.24<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br><span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.apache.httpcomponents<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>httpcore<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>4.4.16<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br><span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>commons-lang<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>commons-lang<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>2.6<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br><span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>mysql<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>mysql-connector-java<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>8.0.30<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br></code></pre></td></tr></table></figure>

<p>在demo示例项目中导入renren-common的依赖</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">dependency</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">groupId</span>&gt;</span>org.example<span class="hljs-tag">&lt;/<span class="hljs-name">groupId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">artifactId</span>&gt;</span>renren-common<span class="hljs-tag">&lt;/<span class="hljs-name">artifactId</span>&gt;</span><br>    <span class="hljs-tag">&lt;<span class="hljs-name">version</span>&gt;</span>1.0-SNAPSHOT<span class="hljs-tag">&lt;/<span class="hljs-name">version</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">dependency</span>&gt;</span><br></code></pre></td></tr></table></figure>

<p>在运行项目前，还需要在demo配置mysql的连接</p>
<figure class="highlight properties"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><code class="hljs properties"><span class="hljs-comment"># 应用名称</span><br><span class="hljs-attr">spring.application.name</span>=<span class="hljs-string">demo</span><br><span class="hljs-comment"></span><br><span class="hljs-comment"># 应用服务 WEB 访问端口</span><br><span class="hljs-attr">server.port</span>=<span class="hljs-string">8080</span><br><span class="hljs-comment"># 数据库驱动：</span><br><span class="hljs-attr">spring.datasource.driver-class-name</span>=<span class="hljs-string">com.mysql.cj.jdbc.Driver</span><br><span class="hljs-comment"># 数据源名称</span><br><span class="hljs-attr">spring.datasource.name</span>=<span class="hljs-string">defaultDataSource</span><br><span class="hljs-comment"># 数据库连接地址</span><br><span class="hljs-attr">spring.datasource.url</span>=<span class="hljs-string">jdbc:mysql://localhost:3306/demo?serverTimezone=UTC</span><br><span class="hljs-comment"># 数据库用户名&amp;密码：</span><br><span class="hljs-attr">spring.datasource.username</span>=<span class="hljs-string">root</span><br><span class="hljs-attr">spring.datasource.password</span>=<span class="hljs-string">123456</span><br><span class="hljs-comment"># 配置mybatis-plus 打印sql日志</span><br><span class="hljs-attr">mybatis-plus.configuration.log-impl</span>=<span class="hljs-string">org.apache.ibatis.logging.stdout.StdOutImpl</span><br><span class="hljs-comment"></span><br><span class="hljs-comment"># xml文件路径</span><br><span class="hljs-attr">mybatis-plus.mapper-locations</span>=<span class="hljs-string">classpath:/mapper/**/*.xml</span><br><span class="hljs-comment"></span><br><span class="hljs-comment"># 配置最新全局配置文件</span><br><span class="hljs-comment">#mybatis-plus.config-location=classpath:mybatis-config.xml</span><br><span class="hljs-comment"></span><br><span class="hljs-comment"># 配置mybatis-plus 包路径</span><br><span class="hljs-attr">mybatis-plus.type-aliases-package</span>=<span class="hljs-string">com.example.demo.domain</span><br><span class="hljs-comment"></span><br><span class="hljs-comment"># mybatis-plus下划线转驼峰配置，默认为true</span><br><span class="hljs-attr">mybatis-plus.configuration.map-underscore-to-camel-case</span>=<span class="hljs-string">true</span><br><span class="hljs-comment"></span><br><span class="hljs-comment"># 配置全局默认主键类型，实体类不用加@TableId(value =&quot;id&quot;,type = IdType.AUTO)</span><br><span class="hljs-attr">mybatis-plus.global-config.db-config.id-type</span>=<span class="hljs-string">auto</span><br><span class="hljs-comment"></span><br><span class="hljs-comment"># 逻辑删除 （1为删除，0为未删除）</span><br><span class="hljs-attr">mybatis-plus.global-config.db-config.logic-delete-value</span>=<span class="hljs-string">1</span><br><span class="hljs-attr">mybatis-plus.global-config.db-config.logic-not-delete-value</span>=<span class="hljs-string">0</span><br><span class="hljs-comment"></span><br><span class="hljs-comment"># 如果java实体类没加注解@TableLogic，则可以配置这个，推介这里配置</span><br><span class="hljs-attr">mybatis-plus.global-config.db-config.logic-delete-field</span>=<span class="hljs-string">isDeleted</span><br></code></pre></td></tr></table></figure>

<p>运行demo项目</p>
<p><img src="https://gitee.com/tongstyle/blog-img/raw/master/img/202301201952508.png" srcset="/img/loading.gif" lazyload alt="27"></p>
<p>链接：<a target="_blank" rel="noopener" href="https://pan.baidu.com/s/1OP2oPB1onrzMMai7jOmneg?pwd=j4nw">https://pan.baidu.com/s/1OP2oPB1onrzMMai7jOmneg?pwd=j4nw</a><br>提取码：j4nw<br>–来自百度网盘超级会员V3的分享</p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/%E4%BA%BA%E4%BA%BA%E5%BC%80%E6%BA%90/" class="category-chain-item">人人开源</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/%E4%BA%BA%E4%BA%BA%E5%BC%80%E6%BA%90/">#人人开源</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>人人开源配置</div>
      <div>http://example.com/2022/12/13/编程语言/Java/项目/人人开源/人人开源/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>深海火锅店</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2022年12月13日</div>
        </div>
      
      
      
        <div class="license-meta-item">
          <div>许可协议</div>
          <div>
            
              
              
                <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
                  <span class="hint--top hint--rounded" aria-label="BY - 署名">
                    <i class="iconfont icon-by"></i>
                  </span>
                </a>
              
            
          </div>
        </div>
      
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2022/12/14/%E6%95%B0%E6%8D%AE%E5%BA%93/MySQL/MySQL%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/MySQL%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4/" title="mysql复习">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">mysql复习</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2022/12/13/%E7%B3%BB%E7%BB%9F%E9%85%8D%E7%BD%AE/%E7%BC%96%E7%A8%8B%E9%85%8D%E7%BD%AE/%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE/Git%E9%85%8D%E7%BD%AE/git%E9%85%8D%E7%BD%AE/" title="git配置">
                        <span class="hidden-mobile">git配置</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
    <div class="statistics">
  
  

  
    
      <span id="busuanzi_container_site_pv" style="display: none">
        总访问量 
        <span id="busuanzi_value_site_pv"></span>
         次
      </span>
    
    
      <span id="busuanzi_container_site_uv" style="display: none">
        总访客数 
        <span id="busuanzi_value_site_uv"></span>
         人
      </span>
    
    
  
</div>

  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.18.2/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init(Object.assign({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      scrollSmooth    : true,
      includeTitleTags: true,
      headingsOffset  : -boardTop,
    }, CONFIG.toc));
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }

    Fluid.events.registerRefreshCallback(function() {
      if ('tocbot' in window) {
        tocbot.refresh();
        var toc = jQuery('#toc');
        if (toc.length === 0 || !tocbot) {
          return;
        }
        if (toc.find('.toc-list-item').length > 0) {
          toc.css('visibility', 'visible');
        }
      }
    });
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.11/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));

    Fluid.events.registerRefreshCallback(function() {
      if ('anchors' in window) {
        anchors.removeAll();
        var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
        var res = [];
        for (var item of el) {
          res.push('.markdown-body > ' + item.trim());
        }
        if (CONFIG.anchorjs.placement === 'left') {
          anchors.options.class = 'anchorjs-link-left';
        }
        anchors.add(res.join(', '));
      }
    });
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>

  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>




  
<script src="//cdn.jsdelivr.net/gh/EmoryHuang/BlogBeautify@1.1/DynamicRibbon.min.js"></script>



<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
